package com.jsgt.greekfire.ui.me.setting

import android.app.Dialog
import android.view.View
import android.widget.TextView
import androidx.lifecycle.Observer
import androidx.lifecycle.ViewModelProvider
import com.fhx.core.base.BaseActivity
import com.fhx.core.goToActivity
import com.fhx.core.utils.DialogUtil
import com.fhx.core.utils.ToastUtils
import com.jsgt.greekfire.App
import com.jsgt.greekfire.R
import com.jsgt.greekfire.dao.model.IdentityBean
import com.jsgt.greekfire.ui.mine.user.language.LanguageActivity
import kotlinx.android.synthetic.main.activity_setting.*
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch

class SettingActivity : BaseActivity(), View.OnClickListener {
    private val walletViewModel: com.jsgt.greekfire.dao.viewmodel.WalletViewModel by lazy {
        ViewModelProvider(this).get(com.jsgt.greekfire.dao.viewmodel.WalletViewModel::class.java)
    }

    override fun needFitsSystemWindows(): Boolean {
        return false
    }

    override fun getLayoutId(): Int {
        return R.layout.activity_setting
    }

    override fun main() {
        setStatusBar(R.color.transparent, false, R.color.white)

        itemLanguage.setOnClickListener(this)
        itemUnit.setOnClickListener(this)
        itemNode.setOnClickListener(this)
    }

    override fun onClick(v: View?) {
        when (v?.id) {
            R.id.itemLanguage -> {
                goToActivity<LanguageActivity>()
            }
            R.id.itemUnit->{
                ToastUtils.show(R.string.not_yet_open)
            }
            R.id.itemNode->{
                ToastUtils.show(R.string.not_yet_open)
            }
        }
    }
}